Original: http://www.2cto.com/database/201310/250880.htmlSQL cast and CONVERT usage detailed Summary: The following applies only to Mysqlselect {fn CONCAT (CONVERT (User_id,char), user_name)} as Str from T_SYS_ User following this applies only to
Syntax differences between MySQL and Oracle detailed comparison of some simple commands of bitsCN. comOracle and mysql
1) SQL> select to_char (sysdate, 'yyyy-mm-DD') from dual;
SQL> select to_char (sysdate, 'hh24-mi-SS') from dual;
Mysql> select
MySQL tips 6-MySQL language structure-function bitsCN.com 1. mathematical functions are used to perform complex arithmetic operations. MySQL supports many mathematical functions. If an error occurs, all mathematical functions return NULL. (1)
First, the literal value 1. StringA string is a sequence of characters that is caused by a single quotation mark ("') or double quotation mark ('" '). For example:‘a string‘"another string"If SQL Server mode is enabled for Nsi_quotes, you can refer
Mysql common functions, difficulties, notes, and difficulties of mysql Functions
I. mathematical functionsABS (x) returns the absolute value of x.BIN (x) returns the binary value of x (OCT returns octal, HEX returns hexadecimal)
CEILING (x) returns
Comparison of some simple commands of Oracle and mysql will involve many instances in this article. If you are interested, you may wish to learn more and consolidate your knowledge.
Comparison of some simple commands of Oracle and mysql will involve
Table 12.14 Conversion Functions (cast function)
name
Description
BINARY
Converts a string to a binary string
CAST()
Convert a value to a specific type
Comparison of some simple commands of Oracle and mysql1) SQL> select to_char (sysdate, 'yyyy-mm-dd') from dual;SQL> select to_char (sysdate, 'hh24-mi-ss') from dual;Mysql> select date_format (now (), '% Y-% m-% D ');Mysql> select time_format (now (),
Some days ago the database was invaded, the reading of the article has been modified, fortunately, timely discovery and good backup. Check the MySQL statement record, and found that this is the original sentence SQL in mischief:UPDATE table SET
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.